<?php
$today = getBingToday(); //($this->is('index')) ?  getBingToday() : randBing(1)[0];
$url = $today['url'] ? $today['url'] : $today['urlstr'];
?>
<div class="-header-cover <?php echo ($this->is('index')) ? '-today' : ''; ?>" style="background:url('<?php echo ($url); ?>');">
    <div class="-blur">
        <div class="--logo">
            <div class="-icon -logo" style="width: 100%;height:60px;"></div>
            <div class="text-center text-tiny1 text-trd-gray"><?php $this->options->description() ?></div>
            <div class="page-title text-tiny">
                <div class="text-ellipsis">
                    <?php $this->options->title(); ?>
                </div>
            </div>
            <div class="text-center text-tiny1 text-sec-gray" onclick="window.open('https://beian.miit.gov.cn')">辽ICP备13014013号</div>

            <div style="width:130px;" class="text-center text-dark text-tiny1 prt d-flex a-center c-hand" onclick="location.href='<?php echo $this->options->siteUrl . 'index.php/bing.html' ?>';">
                <span>已收集</span>
                <strong class="px-1 text-primary"><?php echo $today['count']; ?></strong>
                <span>张精美图片</span>
                <i class="icon icon-arrow-right ml-1"></i>
            </div>
        </div>
    </div>
    <div class="inner">
        <img src="<?php echo ($url); ?>" alt="<?php echo ($today['title']); ?>" />
        <div style="padding:20px;">
            <span class="chip <?php echo ($this->is('index')) ? 'bg-success' : 'bg-success'; ?> text-uppercase">
                <!-- <?php echo ($this->is('index')) ? 'today 今日图片' : 'review 往期图片'; ?> -->
                today 今日图片
            </span>
            <div class="text-large text-bold">
                <?php echo ($today['title']); ?>
            </div>
            <div class="text-small text-sec-gray"><?php echo ($today['copyright']); ?></div>
            <div class="d-flex a-center j-end">
                <!-- <div class="-header-cover-item c-hand tooltip tooltip-top" data-tooltip="换一张图片" onclick="">
                    <div class="-icon -reload"></div>
                </div> -->
                <div class="-header-cover-item c-hand tooltip tooltip-top" data-tooltip="了解更多信息" onclick="window.open('<?php echo ($today['copyrightlink']); ?>');">
                    <div class="-icon -link -icon-25"></div>
                </div>
                <div class="-header-cover-item c-hand tooltip tooltip-top" data-tooltip="下载这张图片" onclick="window.open('<?php echo ($today['url']); ?>');">
                    <div class="-icon -download -icon-25"></div>
                </div>
                <div class="-header-cover-item c-hand tooltip tooltip-top" data-tooltip="更多精彩图片" onclick="location.href='<?php echo $this->options->siteUrl . 'index.php/bing.html' ?>';">
                    <div class="-icon -more -icon-25"></div>
                </div>
            </div>
        </div>
    </div>
</div>